<!--#include virtual="/app/common/jsLoader.asp" -->
<%
    require('/app/edk/edk.js');
    require('/app/edk/sql.js');
    require('/app/edk/xml.js');
    require('/app/common/common.js');
    require('/deepcms/classic/public/server.js');
%>
<html>
	<head>
		<%=$$.cfg.headTags()%>
		<link rel="stylesheet" href="/deepcms/classic/public/style.css" type="text/css"/>
	</head>
	<body>
		<h1>新闻分类</h1>
        <%
         	var sql = $$.newInstance($$.sql);
         	with(sql.list("SELECT * FROM newsClass", $$.cfg.Tags('//listTable//div'), true, {
         		'perfix' : 'edit/'
         	})){
				Response.write(html + paged); 
				connObj.close();  
         	}
        %>
        <fieldset>
        	<legend>
    			新建分类：
        	</legend>
	    	<form id="createClassForm" method="POST" action="/app/news/class/default.asp">
	    		<input type="text" name="title" id="title" class="edk-input-2" /> 
				<input type="hidden" name="mediaLogo" id="mediaLogo" />
	    		<input type="submit" value="    新建分类   " />
	    	</form>
	    	分类图片：
	    	<form target="uploadIframe" action="/app/upload/default.asp?uploadTo=<%=$$.cfg.app_root%>upload" method="POST" ENCTYPE="multipart/form-data">
	    		<input type="file"  class="edk-input-2"  name="file_1" />
	    	    <input type="submit" value="   上传图片   " />
			</form>
			<iframe id="uploadIframe" name="uploadIframe" class="hide"></iframe>
			<script>
				function uploadSuccessful_hander(fileName){
					Ext.fly('mediaLogo').dom.value = eval(fileName)[0].path.split('\\').pop();
				}
				Ext.get('createClassForm').on('submit', function(e){
					if(Ext.fly('title').getValue() == ''){
						alert('请分类的标题');					
						e.stopEvent();
						return false;
					}
				});
			</script>
        </fieldset>
        <br />
    	<form id="searchForm" method="GET" action="?">
    		搜索：
    		<input type="text" name="search_Keyword" id="search_Keyword" class="edk-input-2" /> 
    		<input type="submit" value="    查询记录   " />
    	</form>
		<script>
			Ext.get('searchForm').on('submit', function(e){
				if(Ext.fly('search_Keyword').getValue() == ''){
					alert('请输入搜索内容');					
					e.stopEvent();
					return false;
				}
			});
		</script>
	</body>
</html>
